﻿using System.ComponentModel.Composition;

namespace CardPlay.Client.ViewModels
{
    [Export(typeof(GameWonViewModel)), PartCreationPolicy(CreationPolicy.NonShared)]
    public sealed class GameWonViewModel : OptionDialog
    {
        public GameWonViewModel()
        {
            DisplayName = Resources.Caption_GameWon;
            Prompt = Resources.Prompt_GameWon;

            Options.AddRange(new[]
            {
                new CommandViewModel
                {
                    Instruction = Resources.Instruction_PlayAgain,
                    Action = new RelayCommand<object>(delegate { FireComplete(true); })
                },
                new CommandViewModel
                {
                    Instruction = Resources.Instruction_Exit,
                    Action = new RelayCommand<object>(delegate { Exit = true; FireComplete(true); })
                }
            });
        }

        public bool Exit { get; private set; }
    }
}